﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ObjectModel.PowerPoint.New
{
    public enum SourceObjectType { Constant, ExcelRange }

    public class SourceObjectFactory
    {
        public static SourceObject CreateObject(SourceObjectType type)
        {
            switch(type)
            {
                case SourceObjectType.Constant:
                    return new DynamicConstantSource();

                case SourceObjectType.ExcelRange:
                    return new ExcelRangeSourceObject()
                    {
                        Range = new ObjectModel.Excel.ResolvableLiteralRange()
                        {
                            Workbook = new ObjectModel.Excel.ResolvableWorkbook()
                        }
                    };

                default:
                    throw new InvalidOperationException("Type not recognised.");
            }
        }
    }
}
